from flask import session
# 导入扩展flask_script
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from info import create_app,db
app = create_app('development')
# 实例化管理对象
manage = Manager(app)
Migrate(app,db)
manage.add_command('db',MigrateCommand)

if __name__ == '__main__':
    print(app.url_map)
    manage.run()



# from flask import Flask
# from flask_script import Manager
# from flask_sqlalchemy import SQLAlchemy
# from flask_migrate import MigrateCommand,Migrate
# from settings import Config
# app = Flask(__name__)
# app.config.from_object(Config)
# Manager(app)
# db = SQLAlchemy(app)
# Migrate(app,db)
# manage.add_command('db',MigrateCommand)
